import { ref, computed } from 'vue'
import { defineStore } from 'pinia'

// 记录当前列表是否折叠
export const useisFoldStore = defineStore('isFold', () => {
  const isFinite = ref(false)
  function isCollapse() {
    isFinite.value = !isFinite.value
  }
  return { isFinite, isCollapse }
})


// 保存菜单的展开项和激活项
export const useMenuStore1 = defineStore('menu', () => {
  let openMenu = ref<string[]>(['0']) // 保存菜单的展开项
    let activeMenu = ref("0-0") // 保存菜单的激活项
    return { activeMenu, openMenu }
})